unit FormRemoverFuncionarioUnit;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB, Datasnap.DBClient, Vcl.Grids,
  Vcl.DBGrids;

type
  TFormRemoverFuncionario = class(TForm)
    DBGrid1: TDBGrid;
    cdsRemoveFuncionario: TClientDataSet;
    dsRemoveFuncionario: TDataSource;
    cdsRemoveFuncionarioId_Funcionario: TIntegerField;
    cdsRemoveFuncionarioNome_Funcionario: TStringField;
    procedure DBGrid1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormRemoverFuncionario: TFormRemoverFuncionario;

implementation

{$R *.dfm}

procedure TFormRemoverFuncionario.DBGrid1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if key = VK_DELETE then
  cdsRemoveFuncionario.Delete;
end;

end.
